﻿using System.Net;

namespace Game.Lib
{
    public abstract class Server
    {
        /// <summary>
        /// The physical location of the server
        /// </summary>
        public EndPoint Location;
        
        //TODO: inclued a public/private key signing system, to ensure packet reliability
    }

    public struct ServerStats
    {
        /// <summary>
        /// Total number of packets sent to the server
        /// </summary>
        public long PacketsSent;

        /// <summary>
        /// Total number of packets recieved from the server
        /// </summary>
        public long PacketsRecieved;


        public long BytesSent;


        public long BytesRecieved;

        /// <summary>
        /// Time in miliseconds that the  client has been connected to the server
        /// </summary>
        public long TimeConnected;


        public long PingsSent;


        public long PingsRecieved;


        public int IncomingBPS;


        public int OutgoingBPS;


        public ServerType Type;


        public int ServerClass;
    }

    public enum ServerType : byte
    {
        Simulator = 0,
        AccessGateway = 1,
        AssetServer = 2
    }
}